import React from 'react';
import PropTypes from 'prop-types';


const Vote = (props) => {
    return (
        <div>
            <p>支持人数：{props.state.upNum}</p>
            <p>反对人数：{props.state.downNum}</p>
        </div>
    );
};


Vote.propTypes = {
    state: PropTypes.object.isRequired,
};

Vote.defaultProps = {
    state: {
        upNum: 0,
        downNum: 0,
    }
}


export default Vote;
